import http from "../utils/http/service";

// 新增学术
export const postInfoManageAdd = (data): any => {
  return http.post("/rdms-admin/infoManage/add", data);
};
// 获取列表
export const postInfoManageList = (data): any => {
  return http.post("/rdms-admin/infoManage/list", data);
};

// 删除文档
export const postInfoManageDelete = (data): any => {
  return http.post(`/rdms-admin/infoManage/delete/${data.id}`, {});
};

// 更新
export const postInfoManageUpdate = (data): any => {
  return http.post("/rdms-admin/infoManage/update", data);
};

// 详情
export const postInfoManageInfo = (data): any => {
  return http.post(`/rdms-admin/infoManage/detail/${data.id}`, {});
};

// 已发布公告
export const postAnnouncementList = (data): any => {
  return http.post(`/rdms-admin/infoManage/announcement/list`, data);
};

// 已发布资讯
export const postInformationList = (data): any => {
  return http.post(`/rdms-admin/infoManage/information/list`, data);
};

// 发布
export const postInfoPublish = (data): any => {
  return http.post(`/rdms-admin/infoManage/publish/${data.id}`, {});
};

// 取消发布
export const postInfoUnPublish = (data): any => {
  return http.post(`/rdms-admin/infoManage/nonpublish/${data.id}`, {});
};
